#!/bin/sh

linuxName=`uname -r`


killall -9 monitor.sh
killall -9 usb.sh
killall -9 bondCheck.sh
killall -9 air_flash

cp AIR_FLASH/* /AIR_FLASH -fr
if [ "${linuxName}" != "4.19.68-dirty" ] ; then
    cp /lib/modules/4.19.68/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko /AIR_FLASH/usb/
    cp /lib/modules/4.19.68/kernel/drivers/usb/gadget/libcomposite.ko /AIR_FLASH/usb/
    cp /lib/modules/4.19.68/kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko /AIR_FLASH/usb/
fi

chmod 777 /AIR_FLASH/* -R

